import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { MarshalException } from "../../Engine/RMI/MarshalException";
type int = number;
//class EBufferOp

export class EBufferOp {
  constructor(arg1: int) {
    this.__value = arg1;
    return;
  }

  public value(): int {
    return this.__value;
  }

  public __write(arg1: SerializeStream): void {
    arg1.writeByte(this.__value);
    return;
  }

  public static convert(arg1: int): EBufferOp {
    return new EBufferOp(arg1);
  }

  public static __read(arg1: SerializeStream): EBufferOp {
    var loc1 = arg1.readByte();
    if (loc1 < 0 || loc1 >= 4) {
      throw new MarshalException();
    }
    return EBufferOp.convert(loc1);
  }

  public static /* const */ _EBufferOpAdd: int = 1;

  public static /* const */ _EBufferOpUpdate: int = 2;

  public static /* const */ _EBufferOpRemove: int = 3;

  public /* var */ __value: int;
}
